package com.scalar.chiptrack.operations.process.forms;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.upload.FormFile;

import com.scalar.chiptrack.ChipTrackActionForm;
import com.scalar.chiptrack.operations.process.SortProcess;

/**
 * Form bean for the Sort_Process page.  This form has the following fields,
 * with default values in square brackets:
 * <ul>
 * <li><b>action</b> - The maintenance action we are performing (Create & Modify).
 * </ul>
 *
 * @author Kesava Kumar Achanala
 * @version $Revision: 1.1.1.1 $ $Date: 2006/12/11 23:43:11 $
 */




public final class SortProcessForm extends ChipTrackActionForm  {


    // --------------------------------------------------- Instance Variables

	private SortProcess sortProcess = new SortProcess();

	private String action = null;
        private FormFile procedureDocFile = null;
        private FormFile programDocFile = null;



    // ----------------------------------------------------------- Properties

     /**
      * Get the Sort Process
      *
      * @return sortProcess
      */
     public SortProcess getSortProcess() {
           return sortProcess;
     }


     /**
      * Set the Sort Process
      *
      * @param sortProcess
      */
     public void setSortProcess(SortProcess sortProcess) {
	 	this.sortProcess = sortProcess;
     }

  /**
      * Get the ProgramDoc File
      *
      * @return programDocFile
      */
     public FormFile getProgramDocFile()
     {
         return programDocFile;
     }
     
     /**
      *  Set the Program Doc File
      *
      * @param programDocFile
      */
     public void setProgramDocFile(FormFile programDocFile)
     {
         this.programDocFile = programDocFile;
     }

    /**
     * Get the ProcedureDoc File
     *
     * @return procedureDocFile
     */
     public FormFile getProcedureDocFile()
     {
         return procedureDocFile;
     }
     
     /**
      *  Set the Procedure Doc File
      *
      * @param procedureDocFile
      */
     public void setProcedureDocFile(FormFile procedureDocFile)
     {
         this.procedureDocFile = procedureDocFile;
     }     
     
     
     
     /**
      * Get action
      *
      * @return action
      */
      public String getAction()
      {
	   return action;
      }

     /**
      * Set the action
      *
      * @param action
      */
      public void setAction(String action)
      {
            this.action = action;
      }



    // --------------------------------------------------------- Public Methods


    /**
     * Reset all properties to their default values.
     *
     * @param mapping The mapping used to select this instance
     * @param request The servlet request we are processing
     */
    public void reset(ActionMapping mapping, HttpServletRequest request) {

       // this.vendorName = null;

    }


    /**
     * Validate the properties that have been set from this HTTP request,
     * and return an <code>ActionErrors</code> object that encapsulates any
     * validation errors that have been found.  If no errors are found, return
     * <code>null</code> or an <code>ActionErrors</code> object with no
     * recorded error messages.
     *
     * @param mapping The mapping used to select this instance
     * @param request The servlet request we are processing
     */
    public ActionErrors validate(ActionMapping mapping,
                                 HttpServletRequest request) {

        ActionErrors errors = new ActionErrors();
       // if ((vendorName == null) || (vendorName.length() < 1))
         //   errors.add("Vendor", new ActionError("error.vendor name.required"));

        return errors;

    }


}
